import HooksFeedClient from '@/app/(root)/hooks/HooksFeedClient';
import { HooksFeedType } from '@/components/hooksPlayer/constants';

import { generateMetadata } from './metadata';

export { generateMetadata };

type Props = {
  params: Promise<{ id: string; slug: string }>;
  searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
};

export default async function HookProfileFeedPage(props: Props) {
  const params = await props.params;
  const hookId = params.id;
  const userHandle = params.slug.replace('%40', '');

  return (
    <HooksFeedClient
      feedId={HooksFeedType.Profile}
      hookId={hookId}
      userHandle={userHandle}
      authBypass
    />
  );
}
